home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.AbstractAction;
- import com.sun.java.swing.JOptionPane;
- import java.awt.event.ActionEvent;
- import java.io.File;
- import java.io.IOException;
-
- class BasicFileChooserUI$NewFolderAction extends AbstractAction {
- // $FF: synthetic field
- BasicFileChooserUI this$0;
-
- // $FF: synthetic method
- protected BasicFileChooserUI$NewFolderAction(BasicFileChooserUI this$0) {
- super("New Folder");
- this.this$0 = this$0;
- }
-
- public void actionPerformed(ActionEvent e) {
- File currentDirectory = this.this$0.getFileChooser().getCurrentDirectory();
- File newFolder = null;
-
- try {
- newFolder = this.this$0.getFileChooser().getFileSystemView().createNewFolder(currentDirectory);
- } catch (IOException var5) {
- JOptionPane.showMessageDialog(this.this$0.getFileChooser(), "Error creating new folder: " + var5, "Error Creating New Folder", 0);
- return;
- }
-
- this.this$0.getFileChooser().rescanCurrentDirectory();
- this.this$0.getFileChooser().ensureFileIsVisible(newFolder);
- }
- }
-